package zero.tech.games.log.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Select;

import zero.tech.games.entity.log.LogInviteLine;

public interface LogInviteLineMapper {

	void insertBatch(List<LogInviteLine> list);

	@Select("select count(1) from log_invite_line where club_id=#{club_id} and uid=#{uid} and create_stamp between #{begin} and #{end}")
	int totalCount(int club_id,int uid,Date begin,Date end);

	@Select("select * from log_invite_line where club_id=#{club_id} and uid=#{uid} and create_stamp between #{begin} and #{end} limit #{start},#{pageLength}")
	List<LogInviteLine> listInviteLineByPage(int club_id,int uid,int start,int pageLength,Date begin,Date end);

	@Select("select count(1) from log_invite_line where club_id=#{club_id} and uid=#{myuid} "
			+ "and inviter_uid=#{uid} and create_stamp between #{begin} and #{end}")
	int selectTotalCount(int club_id, int myuid, int uid, Date begin, Date end);

	@Select("select * from log_invite_line where club_id=#{club_id} and uid=#{myuid} "
			+ "and inviter_uid=#{uid} and create_stamp between #{begin} and #{end} limit #{start},#{pageLength}")
	List<LogInviteLine> selectInviteLineByPage(int club_id, int myuid,int uid,int start,int pageLength, Date begin, Date end);

}
